package com.xz.spi.jdbc.oracle;

import com.xz.spi.jdbc.Driver;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by fingal on 2018/1/7.
 */
public class OracleDriver implements Driver {
    private static final Pattern URL_PATTERN = Pattern.compile("jdbc:oracle:thin:@");

    @Override
    public boolean acceptsURL(String url) {
        Matcher matcher = URL_PATTERN.matcher(url);
        if(matcher.find()) {
            return true;
        }
        return false;
    }

    @Override
    public String connect() {
        return "connect to sql server";
    }
}
